//
//  NYExamineViewStartTestView.m
//  NiuWaJiaoYu
//
//  Created by 袁航 on 2018/1/9.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYExamineViewStartTestView.h"
@interface NYExamineViewStartTestView ()

@end
@implementation NYExamineViewStartTestView

- (void)setupTableView
{
        [super setupTableView];
        [self addSubview:self.startTestBtn];
        [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) {
                
                if (@available(iOS 11.0,*))
                {
                        make.top.equalTo(self.mas_safeAreaLayoutGuideTop);
                        make.left.equalTo(self.mas_safeAreaLayoutGuideLeft);
                        make.right.equalTo(self.mas_safeAreaLayoutGuideRight);
                }
                else
                {
                        make.top.equalTo(self.controller.mas_topLayoutGuideBottom);
                        make.left.right.equalTo(self);
                }
        }];
        [self.startTestBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
                if (@available(iOS 11.0,*))
                {
                        make.bottom.equalTo(self.mas_safeAreaLayoutGuideBottom);
                        make.left.equalTo(self.mas_safeAreaLayoutGuideLeft);
                        make.right.equalTo(self.mas_safeAreaLayoutGuideRight);
                }
                else
                {
                        make.bottom.equalTo(self.controller.mas_bottomLayoutGuideTop);
                        make.left.right.equalTo(self);
                }
                make.top.equalTo(self.tableView.mas_bottom);
                make.height.mas_equalTo(__WGHeight(56));
        }];
}

- (QMUIButton *)startTestBtn
{
        if ( _startTestBtn == nil )
        {
                _startTestBtn = [[QMUIButton alloc] qmui_initWithImage:nil title:@"开始考试"];
                [_startTestBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
                _startTestBtn.titleLabel.font = WGSystem17Font;
                _startTestBtn.backgroundColor = UIColorHex(0xfa8d00);
        }
        return _startTestBtn;
}
@end
